package com.oi.eksekutif.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * Author   : Deny Prasetyo, S.T
 * Email    : jasoet87@gmail.com
 * Blog     : jasoet.wordpress.com
 * Twitter  : http://www.twitter.com/jasoet
 */

@Entity
@Table
public class User implements Serializable {
    @Id
    @GeneratedValue
    private Long id;
    private boolean enabled;
    private String username;
    private String password;
    @OneToMany
    private List<Role> roles;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }
}
